home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / asmhelp.zip / COM.ASM < prev    next >
Assembly Source File  |  1987-10-30  |  2KB  |  79 lines

  1.     .xlist
  2.     if1
  3.     %out    COM.ASM
  4.     endif
  5.     if2
  6.     %out    *** PASS 2
  7.     endif
  8.     name    NAME
  9.     title    TITLE
  10.     subttl    SUBTITLE
  11.     page    66,132
  12.     .list
  13.  
  14. ; ************************************************************************
  15. ; **                                    **
  16. ; ** filename:    com.asm                            **
  17. ; **                                    **
  18. ; **    Provides a template for MS-DOS .COM assembly language programs.    **
  19. ; **                                    **
  20. ; ************************************************************************
  21.  
  22. ; define bios and dos interrupts, functions, and services
  23.     .xlist
  24.     include    bios_dos.inc
  25.     .list
  26.  
  27. ; define constants
  28.     .xlist
  29.     include    equates.inc
  30.     .list
  31.  
  32. code    segment public
  33.     assume    cs:code,ds:code
  34.  
  35.     org    0            ; PSP
  36.  
  37. term_inst    dw    (?)        ; terminate (int 20H) instruction
  38. mem_size    dw    (?)        ; size of available memory
  39. reserved_0    db    (?)        ; reserved (normally 0)
  40. call_dispatch    db    5 dup (?)    ; call to DOS function dispatcher
  41. term_vec    dd    (?)        ; terminate vector
  42. brk_vec        dd    (?)        ; break vector
  43. err_vec        dd    (?)        ; error vector
  44. dos_use        db    22 dup (?)    ; used by DOS
  45. env_ptr        dw    (?)        ; environment string pointer
  46. dos_work    db    34 dup (?)    ; DOS work area
  47. int21_retf    db    3 dup (?)    ; int 21 and retf instructions
  48. reserved_1    db    2 dup (?)    ; reserved
  49. fcb_1_ext    db    7 dup (?)    ; FCB 1 extension
  50. fcb_1        db    9 dup (?)    ; FCB 1
  51. fcb_2_ext    db    7 dup (?)    ; FCB 2 extension
  52. fcb_2        db    20 dup (?)    ; FCB 2
  53. dta        equ    $        ; default dta
  54. attrib        equ    $ + 21        ; found file attribute
  55. ftime        equ    $ + 22        ; found file time stamp
  56. fdate        equ    $ + 24        ; found file date stamp
  57. fsize        equ    $ + 26        ; found file size
  58. fname        equ    $ + 30        ; found file asciiz filename
  59. parm_size    db    (?)        ; parameter size
  60. parm        db    127 dup (?)    ; parameter
  61.  
  62.  
  63.     org    100H            ;
  64.  
  65. pgm:
  66.     jmp    start            ; don't execute data
  67.  
  68.  
  69. ; data storage
  70. ;        YOUR DATA HERE!
  71.  
  72. start:
  73. ;        YOUR PROGRAM HERE!
  74.     int    dos_term        ; terminate program
  75.  
  76. code    ends
  77.  
  78.     end    pgm
  79.